#pragma once

#include "IDomain2.h"
#include "math.h"


class Segment2 : public IConvexDomain2
{
public:
	explicit Segment2(const Vector2& halfExtents);
	const Vector2 startPoint() const;
	const Vector2 endPoint() const;
	virtual const Vector2 internalPoint() const;
	virtual const Vector2 supportPoint(const Vector2& normal) const;

private:
	//start point is always equal to origin.
	Vector2 halfExtents_;
};
